<?php

namespace App\Modules\Apicrzs\Http\Controllers\Buy;

use App\Modules\Apicrzs\Http\Controllers\BaseApicrzsController;
use App\Modules\Apicrzs\Services\ApiApparatusService;
use App\Modules\Apicrzs\Services\Water\WaterDeviceService;
use App\Traits\CryptAES;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class WaterDeviceControllers extends BaseApicrzsController
{
    public function __construct(WaterDeviceService $service)
    {
        $this->service = $service;
    }
    public function lists(Request $request): JsonResponse
    {
        $uid =$this->user_id;
        $data = $this->service->getLists($request->all());
        return $this->sendApiSuccess($data);
    }
    public function getApparatusCount(Request $request): JsonResponse
    {
        $uid =$this->user_id;
        $data = $this->service->getApparatusCount($this->user_id);
        return $this->sendApiSuccess($data);
    }
}
